#pragma once

#include "MBDataTypes.h"

/**
  *	An MBVec2 is a conventional vector with two elements. The data type of these
  * two elements is double.
  */
class MBVec2
{
public:
	MBVec2( void );
	MBVec2( const double *values );
	MBVec2( const double &v1, const double &v2 );

	double &operator[]( const MBuint &index );
	const double &operator[]( const MBuint &index ) const;

	bool operator==(const MBVec2 &other) const;

	static bool compareMBVec2(const MBVec2 &p1, const MBVec2 &p2){
		if( p1[0] > p2[0] ) 
			return false;

		if( p1[0] < p2[0] )
			return true;
		
		return p1[1] < p2[1];
	}

private:
	/** The two double values defining the 2D vector */
	double mValues[2];
};